package com.pvdnc.worldmagisk.shell.client;

import android.util.Log;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public abstract class CommandResponseHandler extends SimpleChannelInboundHandler<CommandResponse> {
    private static final String TAG=CommandResponseHandler.class.getSimpleName();

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, CommandResponse msg) throws Exception {
        Log.d(TAG,"on command response received");
        onResult(msg.mResult);
    }

    public abstract void onResult(String result);
}
